home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Tools - Objects / C++ / MPW C++ 3.1b1 / Examples / CPlusExamples / TESample.h < prev    next >
Text File  |  1989-09-29  |  2KB  |  81 lines

  1. /*------------------------------------------------------------------------------
  2. #
  3. #    Apple Macintosh Developer Technical Support
  4. #
  5. #    MultiFinder-Aware Simple TextEdit Sample Application
  6. #
  7. #    CPlusTESample
  8. #
  9. #    TESample.h    -    C++ source
  10. #
  11. #    Copyright © 1989 Apple Computer, Inc.
  12. #    All rights reserved.
  13. #
  14. #    Versions:    
  15. #            1.10                     07/89
  16. #            1.00                     04/89
  17. #
  18. #    Components:
  19. #            CPlusTESample.make        July 9, 1989
  20. #            TApplicationCommon.h    July 9, 1989
  21. #            TApplication.h            July 9, 1989
  22. #            TDocument.h                July 9, 1989
  23. #            TECommon.h                July 9, 1989
  24. #            TESample.h                July 9, 1989
  25. #            TEDocument.h            July 9, 1989
  26. #            TApplication.cp            July 9, 1989
  27. #            TDocument.cp            July 9, 1989
  28. #            TESample.cp                July 9, 1989
  29. #            TEDocument.cp            July 9, 1989
  30. #            TESampleGlue.a            July 9, 1989
  31. #            TApplication.r            July 9, 1989
  32. #            TESample.r                July 9, 1989
  33. #
  34. #    CPlusTESample is an example application that demonstrates
  35. #    how to initialize the commonly used toolbox managers,
  36. #    operate successfully under MultiFinder, handle desk
  37. #    accessories and create, grow, and zoom windows. The
  38. #    fundamental TextEdit toolbox calls and TextEdit autoscroll
  39. #    are demonstrated. It also shows how to create and maintain
  40. #    scrollbar controls. 
  41. #
  42. #    This version of TESample has been substantially reworked in
  43. #    C++ to show how a "typical" object oriented program could
  44. #    be written. To this end, what was once a single source code
  45. #    file has been restructured into a set of classes which
  46. #    demonstrate the advantages of object-oriented programming.
  47. #
  48. ------------------------------------------------------------------------------*/
  49.  
  50. #ifndef TESample_Defs
  51. #define TESample_Defs
  52.  
  53. // we need resource definitions
  54. #include "TECommon.h"
  55.  
  56. // Since we are based on the Application class, we need its class definitions
  57. #include "TApplication.h"
  58.  
  59. // TESample is our application class. It is a subclass of TApplication,
  60. // so it only needs to specify its behaviour in areas where it is different
  61. // from the default.
  62. class TESample : public TApplication {
  63. public:
  64.     TESample(void);                // Our constructor
  65.  
  66. private:
  67.     // routines from TApplication we are overriding
  68.     long HeapNeeded(void);
  69.     unsigned long SleepVal(void);
  70.     void DoIdle(void);
  71.     void AdjustCursor(void);
  72.     void AdjustMenus(void);
  73.     void DoMenuCommand(short menuID, short menuItem);
  74.  
  75.     // routines for our own devious purposes
  76.     void DoNew(void);
  77.     void Terminate(void);
  78. };
  79.  
  80. #endif TESample_Defs
  81.